package com.gcj.study02.controller;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by gcj 2021.01.05
 */
@RestController
public class ConfigController {

    //加载默认配置文件
    @Value("${test.msg}")
    private String msg;

    @RequestMapping(value = "index", method = RequestMethod.GET)
    public String index() {
        System.out.println(msg);
        return "The Way 1 : " + msg;
    }
    @RequestMapping(value = "easy")
    public String easy() {

        return "very easy!!!";
    }
}
